﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Data.Linq.Mapping;
using System.Data.Linq;

namespace Sapro_Project
{
    [Table]
	public class Materias
	{
        public EntityRef<Turma> codTurma;
        public Materias() { }
        [Column(IsPrimaryKey=true)]
        public String Codigo
        {
            get;
            set;
        }
        [Column(CanBeNull = false)]
        public String Nome
        {
            get;
            set;
        }
        [Column(CanBeNull = false)]
        public String Turma
        {
            get;
            set;
        }
        [Column(CanBeNull = true)]
        public String Descricao
        {
            get;
            set;
        }
        [Association(IsForeignKey = true, Storage = "codTurma")]
        public Turma Cod_Turma {
            get
            {
                return codTurma.Entity;
            }
            set
            {
                codTurma.Entity = value;
            }
        }
	}
}